Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix(Angular): Infinite $digest Loop occur when using deep $watch on an o... #8715

Closed
wants to merge 1 commit into from

Conversation

SekibOmazic
Copy link
Contributor

...bject that contains an "Invalid Date"

Add better check for invalid dates in method equals.

fixes #8650

…n object that contains an "Invalid Date"

Add better check for invalid dates in method equals.

fixes angular#8650
@caitp
Copy link
Contributor

caitp commented Aug 21, 2014

This looks good to me, but I wonder if we could make the NaN testing in equals() a bit better.. Probably good to merge this for now though

caitp pushed a commit that referenced this pull request Aug 22, 2014
Make angular.equals() Date comparison NaN-aware to prevent infinite digest errors when a dealy watched
date has an invalid value.

Closes #8650
Closes #8715
@caitp caitp closed this in 693e846 Aug 22, 2014
@shahata
Copy link
Contributor

shahata commented Aug 22, 2014

@caitp NaN testing already exists in equals(), so this can be done better easily. See #8718

@caitp
Copy link
Contributor

caitp commented Aug 22, 2014

I don't think #8718 is any better, as mentioned in the PR --- will have to do better than that to clean up that function

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite $digest Loop occur when using deep $watch on an object that contains an "Invalid Date".
4 participants